<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<jsp:include page="/common/meta.jsp"></jsp:include>
<jsp:include page="/common/resource.jsp"></jsp:include>
<script type="text/javascript">
    /** 关闭窗口*/
    function dialogClose() {
        //关闭自己
        if ($.easyui.showDialog.parent.doSearch) {
            $.easyui.showDialog.parent.doSearch();
        } else {
            $.easyui.showDialog.parent.location.reload();
            //刷新父页面
        }
        $.easyui.showDialog.parent.easyuiDialog.close();
    }
    /* 获取放到作用域的值**/
    var  showEntity =${showEntity};
    /** 初始化选择员工*/
    $(function () {
        /* 初始化选择部门*/
        initOrgCombotree();
        /** 初始化角色的checkbox*/
        $(".rolesCheckBox").checkbox({});
    });

    /* 初始化组织机构树**/
    function initOrgCombotree() {
        $("#org_id_VO").combotree({
            url: '${base}/hr/organization/OrganizationController/listQueryCompanyOrganizationTreeNode',
            required: true,
            novalidate: 'true',
            missingMessage: '请选择组织机构',
            onClick: function (node) {
                var company_id = node.attributes.company_id;
                var org_id = node.attributes.org_id;
                /* 设置组织机构id**/
                $("#org_id").val(org_id);
                /* 设置企业会员id**/
                $("#company_org_id").val(company_id);
            },
            onLoadSuccess: function (node, data) {
                $("#org_id_VO").combotree('setValue', showEntity.org_id);

            }
        });
    }
</script>
<body>
<!-- form-box begin -->
<div id="User_show_form" class="form-box" style="padding-top:10px;height: 85% ">
    <jsp:include page="vo/showVO.jsp"></jsp:include>
</div>
<!-- form-box end -->
<div id="childButtons" style=" margin-right: 10px;text-align: right;">
    <a href="javascript:void(0)" class="easyui-linkbutton button-red l-btn l-btn-small" id="close"
       onclick=" dialogClose()">关闭</a>
</div>
</body>
</html>